[KLC-1871] Implement Node Wallet package#4
Merged
fbsobreira merged 23 commits intomasterfrom Dec 16, 2025
Merged
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF ScorecardScorecard details
Scanned Files
|
📦 Bundle Size Report
|
📦 Bundle Size Report
|
📦 Bundle Size Report
|
📦 Bundle Size Report
|
📦 Bundle Size Report
|
There was a problem hiding this comment.
Pull request overview
This PR implements a comprehensive Node Wallet package for the Klever Connect SDK (ticket KLC-1871), adding support for hierarchical deterministic (HD) wallets, mnemonic phrases, and encrypted keystore management.
Key Changes:
- Introduces a high-level
Walletclass extendingNodeWalletwith factory methods for wallet creation - Implements BIP39 mnemonic phrase support and BIP32/BIP44 key derivation for HD wallets
- Adds Web3-compatible keystore encryption/decryption with AES-128-CTR and scrypt KDF
- Updates type definitions to use
IWalletinterface pattern for better API design - Adds security overrides for
globandjs-yamldependencies
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Dependency updates including @scure/bip32 v1.7.0, glob v13.0.0, js-yaml v4.1.1, and esbuild v0.25.12 |
| package.json | Security overrides for glob (>=10.5.0) and js-yaml (>=4.1.1) |
| packages/connect-wallet/src/wallet.ts | New Wallet class with factory methods for random generation, mnemonic import, and keystore decryption |
| packages/connect-wallet/src/types/wallet.ts | Refactored to use IWallet interface with Wallet type alias for backward compatibility |
| packages/connect-wallet/src/index.ts | Added Wallet export |
| packages/connect-react/src/types.ts | Updated to use IWallet interface |
| packages/connect-react/src/reducer.ts | Updated to use IWallet interface |
| packages/connect-crypto/src/hd-wallet.ts | Implements BIP39/BIP32/BIP44 functionality with mnemonic generation, validation, and key derivation |
| packages/connect-crypto/src/keystore.ts | Implements Web3 Secret Storage v3 with AES-128-CTR encryption and scrypt KDF |
| packages/connect-crypto/src/index.ts | Added exports for HD wallet and keystore modules |
| packages/connect-crypto/src/tests/keystore.test.ts | Comprehensive test suite for keystore encryption/decryption |
| packages/connect-crypto/src/tests/hd-wallet.test.ts | Comprehensive test suite for HD wallet functionality |
| packages/connect-crypto/src/tests/index.test.ts | Integration tests and export validation |
| packages/connect-crypto/package.json | Added @scure/bip32 dependency (^1.3.0) |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📦 Bundle Size Report
|
📦 Bundle Size Report
|
fbsobreira
requested changes
Dec 2, 2025
fbsobreira
requested changes
Dec 2, 2025
…oPrivateKey function
📦 Bundle Size Report
|
fbsobreira
reviewed
Dec 3, 2025
📦 Bundle Size Report
|
📦 Bundle Size Report
|
fbsobreira
approved these changes
Dec 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces a complete Node.js wallet implementation with hierarchical deterministic (HD) wallet support, BIP39 mnemonic key derivation, and secure keystore encryption using AES-256-GCM.
Key Changes
HD Wallet Implementation
Keystore Security
Wallet Architecture
SLIP-0010 Ed25519 Derivation